<template>
  <div class="page-wrapper">
    <div class="title">{{ announceDetail.title }}</div>
    <a-flex class="time" justify="space-between">
      <span>{{ announceDetail.createTime }}</span>
      <span @click="$router.go(-1)">返回</span>
    </a-flex>
    <div v-html="announceDetail.description"></div>
  </div>
</template>

<script>
import { defineComponent } from 'vue'
import request, { AxiosWrapper } from '@/utils/request'

export default defineComponent({
  data() {
    return {
      announceDetail: {},
    }
  },
  created() {},
  mounted() {
    this.getAnnounceDetail()
  },
  methods: {
    async getAnnounceDetail() {
      try {
        const id = AxiosWrapper.getHashSearchParam('id')
        const res = await request.get('/hd/appGonggao/queryById?id=' + id)
        this.announceDetail = res.result
      } catch (error) {}
    },
  },
})
</script>

<style lang="less" scoped>
.page-wrapper {
  height: 100%;
  overflow-y: auto;
  background-color: #f3f3f3;
  padding: 0 16px;
}
.page-wrapper::-webkit-scrollbar {
  display: none;
}
.title {
  font-size: 15px;
  line-height: 20px;
  font-weight: bolder;
  color: #000000;
  padding: 10px 0;
}
.time {
  font-size: 12px;
  line-height: 17px;
  margin-bottom: 32px;
}
</style>
